#include "crow_all.h"

// Implementation of function to start crow application
extern "C" {
    void __crow_run_server(void* app_ptr, int port) {
        // This function will be correctly resolved by the linker during compilation
        // We need to actually call the crow application's run method here
        // Try to cast the pointer and run the server if possible
        try {
            crow::SimpleApp* app = static_cast<crow::SimpleApp*>(app_ptr);
            if (app) {
                app->port(port).run();
            }
        } catch (...) {
            // Silently handle errors - logging should be done at higher levels
        }
    }
} 